import { h } from 'vue'
import {
  DashboardOutlined,
  TeamOutlined,
  FileOutlined,
  BellOutlined,
  ClusterOutlined,
  SolutionOutlined,
  ProfileOutlined,
  HomeOutlined,
  MessageOutlined
} from '@ant-design/icons-vue'
import type { MenuConfig } from '@/types/menu'

// 管理员菜单
export const adminMenus: MenuConfig[] = [
  {
    key: '/dashboard',
    icon: () => h(DashboardOutlined),
    label: '首页',
    path: '/dashboard'
  },
  {
    key: '/admin/organization',
    icon: () => h(ClusterOutlined),
    label: '组织架构',
    path: '/admin/organization'
  },
  {
    key: '/admin/teacher',
    icon: () => h(SolutionOutlined),
    label: '教师管理',
    path: '/admin/teacher'
  },
  {
    key: '/admin/student',
    icon: () => h(TeamOutlined),
    label: '学生管理',
    path: '/admin/student'
  },
  {
    key: '/admin/notification',
    label: '通知公告',
    icon: () => h(BellOutlined),
    path: '/admin/notification'
  }
]

// 教师菜单
export const teacherMenus: MenuConfig[] = [
  {
    key: '/dashboard',
    icon: () => h(DashboardOutlined),
    label: '首页',
    path: '/dashboard'
  },
  {
    key: '/teacher/task',
    icon: () => h(ProfileOutlined),
    label: '任务管理',
    path: '/teacher/task'
  },
  {
    key: '/teacher/class',
    icon: () => h(TeamOutlined),
    label: '班级管理',
    path: '/teacher/class'
  },
  {
    key: '/teacher/notification',
    label: '通知公告',
    icon: () => h(BellOutlined),
    path: '/teacher/notification'
  }
]

// 学生菜单
export const studentMenus: MenuConfig[] = [
  {
    key: '/dashboard',
    label: '首页',
    icon: () => h(HomeOutlined),
    path: '/dashboard'
  },
  {
    key: '/student/task',
    label: '任务提交',
    icon: () => h(FileOutlined),
    path: '/student/task'
  },
  {
    key: '/student/notification',
    label: '通知公告',
    icon: () => h(BellOutlined),
    path: '/student/notification'
  }
]

// 根据用户类型获取菜单
export const getMenus = (userType: number): MenuConfig[] => {
  switch (userType) {
    case 1: // 管理员
      return adminMenus
    case 2: // 教师
      return teacherMenus
    case 3: // 学生
      return studentMenus
    default:
      return []
  }
} 